package com.kly.cashmall.module.mine.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.kly.cashmall.R;
import com.kly.cashmall.bean.AccountBean;
import com.kly.cashmall.utils.function.GlideUtils;

/**
 * author :
 * date   : 2019/6/2519:21
 * desc   :
 */
public class AccountListAdapter extends BaseQuickAdapter<AccountBean, BaseViewHolder> {

    public AccountListAdapter() {
        super(R.layout.item_account_list);
    }
    @Override
    protected void convert(@NonNull BaseViewHolder holder, AccountBean accountBean) {
        GlideUtils.loadImage(getContext(),accountBean.getImgUrl(),holder.getView(R.id.account_item_img));
        holder.setText(R.id.account_item_title,accountBean.getTitle());
        holder.setVisible(R.id.bottom_line, holder.getAdapterPosition() + 1 != getItemCount());
    }
}
